<f:subview
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:a4j="http://richfaces.org/a4j"
  id="#{layout.id}">

<c:if test="false">
  Layout template applying to an item instance of PageSelections&lt;DocumentModel&gt; named "documents"

  Other needed parameters are:
  - provider: instance of a PageProvider&lt;DocumentModel&gt; to handle sort
  - layoutListingStatus: iteration status, used to print table header
    matching widget label.
  - formId: the surrounding form id
  - useAjaxForm: whether the form is jaxified or not.
  - contentIdToBeReRendered: mandatory list of elements to reRender when form is ajaxified.

  Since 5.9.1, this file also handles the following templating zones that can
  be replaced using facelets tag ui:define:
  - listing_header
  - listing_row
</c:if>

<ui:insert name="listing_header">
<c:choose>
  <c:when test="#{useRepeatRenderTime}">
    <ui:fragment rendered="#{showListingHeader and layout.properties.showListingHeader}">
      <ui:include src="/layouts/layout_listing_ajax_template_header.xhtml" />
    </ui:fragment>
  </c:when>
  <c:otherwise>
    <c:if test="#{showListingHeader and layout.properties.showListingHeader}">
      <ui:include src="/layouts/layout_listing_ajax_template_header.xhtml" />
    </c:if>
  </c:otherwise>
</c:choose>
</ui:insert>

<ui:insert name="listing_row">
<nxu:set var="trStyleClass" value="#{nxu:test(layoutListingStatus.index%2 ==0, 'dataRowEven', 'dataRowOdd')}">
<tr class="#{nxu:test(layout.properties.showRowEvenOddClass, trStyleClass, '')}">
  <nxl:layoutColumn>
    <td class="#{layoutColumn.properties.columnStyleClass}" dir="auto">
      <nxl:layoutColumnWidget>
        <nxl:widget widget="#{widget}" value="#{value}" />
        <c:if test="#{layoutColumn.size > 1 and layoutColumn.size > widgetIndex + 1}">
          <br />
        </c:if>
      </nxl:layoutColumnWidget>
    </td>
  </nxl:layoutColumn>
</tr>
</nxu:set>
</ui:insert>

</f:subview>
